<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name="viewport" content="width=device-width, initial-scale=0.6, maximum-scale=1.0, user-scalable=no">
    <title></title>
    <!-- 在网页标题左侧显示 -->
    <link rel="icon" href="" type="image/x-icon">
    <!-- 在收藏夹显示图标 -->
    <link rel="shortcut icon" href="" type="image/x-icon">
    <style type="text/css">
        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            display: flex;
            align-items: center;
            /*定义body的元素垂直居中*/
            justify-content: center;
            /*定义body的里的元素水平居中*/
        }
    </style>
</head>

<body>
    <!-- column html start -->
    <div id="qrcode"></div>
    <!-- column html end -->
</body>

<script>
    function loadJs(url, callback) {
        var script = document.createElement('script');
        script.type = "text/javascript";
        if (typeof (callback) != "undefined") {
            if (script.readyState) {
                script.onreadystatechange = function () {
                    if (script.readyState == "loaded" || script.readyState == "complete") {
                        script.onreadystatechange = null;
                        callback();
                    }
                }
            } else {
                script.onload = function () {
                    callback();
                }
            }
        }
        script.src = url;
        document.body.appendChild(script);
    }

    var content = (location.href.split("?content=")[1]);
    content = (decodeURIComponent(content))
    // 生成二维码
    loadJs("https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js", function () {
        loadJs("https://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js", function () {
            jQuery('#qrcode').qrcode({
                text: content,
                render: "table",
                width: 32, //设置宽度    
                height: 32, //设置高度   
                typeNumber: -1, //计算模式  
                correctLevel: 0, //纠错等级  
                background: "#ffffff", //背景颜色  
                foreground: "#000000" //前景颜色  
            });
        });
    });
</script>

</html>